package top.soning.disk.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import top.soning.disk.entity.FileEntity;

@Mapper
public interface FileMapper {
    @Insert("INSERT INTO tb_file (fid, md5, create_time, size) VALUES (NULL, #{md5}, #{createTime}, #{size})")
    @Options(useGeneratedKeys=true, keyProperty="fid", keyColumn="fid")
    int insertFile(FileEntity fileEntity);
}
